﻿Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.ComponentModel

Namespace Dominio
    <Serializable()> _
    Public Class Vuelo

#Region "Atributos privados"

        Private _VueloID As Long
        Private _FechaSalida As DateTime
        Private _FechaLlegada As DateTime
        Private _CiudadOrigen As Ciudad
        Private _CiudadDestino As Ciudad
        Private _Escalas As IList(Of Ciudad)
        Private _Numero As Integer
        Private _Avion As Avion

#End Region

#Region "Propiedades"

        Public Overridable Property VueloID() As Long
            Get
                Return _VueloID
            End Get
            Set(ByVal value As Long)
                _VueloID = value
            End Set
        End Property

        Public Overridable Property FechaSalida() As DateTime
            Get
                Return _FechaSalida
            End Get
            Set(ByVal value As Date)
                _FechaSalida = value
            End Set
        End Property

        Public Overridable Property FechaLlegada() As DateTime
            Get
                Return _FechaLlegada
            End Get
            Set(ByVal value As Date)
                _FechaLlegada = value
            End Set
        End Property

        Public Overridable Property CiudadOrigen() As Ciudad
            Get
                If _CiudadOrigen Is Nothing Then
                    _CiudadOrigen = New Ciudad
                End If
                Return _CiudadOrigen
            End Get
            Set(ByVal value As Ciudad)
                _CiudadOrigen = value
            End Set
        End Property

        Public Overridable Property CiudadDestino() As Ciudad
            Get
                If _CiudadDestino Is Nothing Then
                    _CiudadDestino = New Ciudad
                End If
                Return _CiudadDestino
            End Get
            Set(ByVal value As Ciudad)
                _CiudadDestino = value
            End Set
        End Property

        Public Overridable Property Escalas() As IList(Of Ciudad)
            Get
                Return _Escalas
            End Get
            Set(ByVal value As IList(Of Ciudad))
                _Escalas = value
            End Set
        End Property

        Public Overridable Property Numero() As Integer
            Get
                Return _Numero
            End Get
            Set(ByVal value As Integer)
                _Numero = value
            End Set
        End Property

        Public Overridable Property Avion() As Avion
            Get
                If (_Avion Is Nothing) Then
                    _Avion = New Avion
                End If
                Return _Avion
            End Get
            Set(ByVal value As Avion)
                _Avion = value
            End Set
        End Property

#End Region

#Region "Metodos"

#End Region

    End Class

End Namespace

